package com.uzai.common.enums;

/**
 * 系统插件KEY
 */
public enum PluginKeyEnum {
    /**
     * 淘宝
     */
    TB("tb","淘宝"),
    /**
     * 京东
     */
    JD("jd","京东"),
    /**
     * 拼多多
     */
    PDD("pdd","拼多多"),
    /**
     * 唯品会
     */
    VPH("vph","唯品会"),
    /**
     * 本地生活
     */
    LOCAL_LIVE("local_live","本地生活"),
    /**
     * 微信好友添加
     */
    WX_USER_ADD("wx_user_add","微信好友添加"),
    /**
     * 推广裂变
     */
    USER_EXPAND_FISSION("user_expand_fission","推广裂变"),
    /**
     * 提现
     */
    USER_TAKE_BAL("user_take_bal","提现"),
    /**
     * 好友引导
     */
    USER_GUIDE("user_guide","好友引导"),
    /**
     * 自动备注
     */
    USER_AUTO_REMARK("user_auto_remark","自动备注"),
    /**
     * 订阅消息
     */
    SUBSCRIBE_MSG("subscribe_msg","订阅消息"),
    /**
     * 个人信息查询
     */
    USER_INFO_QUERY("user_info_query","个人信息查询"),
    /**
     * 用户签到
     */
    USER_SIGNIN("user_signin","用户签到"),
    /**
     * 社群管理
     */
    COMMUNITY("community","社群管理"),
    /**
     * 会员类型组
     */
    USER_TYPE_GROUP("userTypeGroup","会员类型组"),
    /**
     * 其他设置
     */
    OTHER("other","其他设置"),
     /**
     * 导购
     */
    SHOPPING_GUIDE("shopping_guide","导购"),
    /**
     *微信机器人关联公众号插件
     */
    WECHAT_UNION_WXPUB("wechat_union_wxpub","微信机器人关联公众号插件"),





    ;

    public static final String TB_VALUE="tb";
    public static final String JD_VALUE="jd";
    public static final String PDD_VALUE="pdd";
    public static final String VPH_VALUE="vph";
    public static final String LOCAL_LIVE_VALUE="local_live";
    public static final String WX_USER_ADD_VALUE="wx_user_add";
    public static final String USER_EXPAND_FISSION_VALUE="user_expand_fission";
    public static final String USER_TAKE_BAL_VALUE="user_take_bal";
    public static final String USER_GUIDE_VALUE="user_guide";
    public static final String USER_AUTO_REMARK_VALUE="user_auto_remark";
    public static final String SUBSCRIBE_MSG_VALUE="subscribe_msg";
    public static final String USER_INFO_QUERY_VALUE="user_info_query";
    public static final String USER_SIGNIN_VALUE="user_signin";
    public static final String COMMUNITY_VALUE="community";
    public static final String USER_TYPE_GROUP_VALUE="userTypeGroup";
    public static final String OTHER_VALUE="other";
    public static final String SHOPPING_GUIDE_VALUE="shopping_guide";

    private String value;
    private String desc;
    PluginKeyEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }
    public String getValue() {
        return value;
    }
    public String getDesc() {
        return desc;
    }
    public static PluginKeyEnum getValue(String value) {
        if (value == null) {
            return null;
        }
        for (PluginKeyEnum type: PluginKeyEnum.values()) {
            if (type.getValue().equals(value) ) {
                return type;
            }
        }
        return null;
    }
    public static String getDesc(String value) {
        if(getValue(value) == null){
            return null;
        }
        return getValue(value).getDesc();
    }

}
